home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMTEX / SOURCES1 / !TeX / texmf / source / armTeX / lib / c / find-suffi < prev    next >
Encoding:
Text File  |  1998-04-06  |  1.2 KB  |  43 lines

  1. /*
  2.  * find-suffix.c: return a suffix.
  3.  * 
  4.  * Copyright (C) 1992, 93 Free Software Foundation, Inc.
  5.  * 
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published
  8.  * by the Free Software Foundation; either version 2, or (at your
  9.  * option) any later version.
  10.  * 
  11.  * This program is distributed in the hope that it will be useful, but
  12.  * WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * General Public License for more details.
  15.  * 
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21. #include "config.h"
  22.  
  23. #include "c-pathch.h"
  24.  
  25.  
  26. /*
  27.  * This procedure has been modified for RISC OS by Jakob Stoklund
  28.  * Olesen 12. Mar 1998. The extension is simply what follows '.' or
  29.  * '/' whatever comes last
  30.  */
  31. string
  32. find_suffix(name)
  33.   string          name;
  34. {
  35.   string          sufpos = NULL;
  36.   while (*name) {
  37.     if (*name == '.' || *name == '/')
  38.       sufpos = name + 1;
  39.     name++;
  40.   }
  41.   return sufpos;
  42. }
  43.